﻿<UserControl x:Class="AdvantIQ.SilverPool.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:uc="clr-namespace:AdvantIQ.SilverPool"
    mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480" Width="600" Height="320">
    <Canvas x:Name="LayoutRoot" Width="600" Loaded="LayoutRoot_Loaded">
        
        <!-- Background-->
        <Rectangle x:Name="BoardFrame" Fill="#FFA21E1E" Canvas.ZIndex="0" Width="600" Height="320"/>
        <Rectangle x:Name="Board" Height="260" Width="540" Fill="#FF1AD21A" Canvas.ZIndex="1" Canvas.Left="30" Canvas.Top="30" MouseLeftButtonDown="Board_MouseLeftButtonDown"></Rectangle>
        <TextBlock x:Name="BoardText" Canvas.Left="94" Canvas.Top="81" TextWrapping="Wrap" Foreground="#FF00C000" FontWeight="Bold" Canvas.ZIndex="2" FontSize="26.667" TextAlignment="Center" MouseLeftButtonDown="Board_MouseLeftButtonDown"><Run Text="SILVERPOOL"/><LineBreak/><Run Text="By Johan Åhlén, 2009"/><LineBreak/><Run Text="(Use left mouse button to"/><LineBreak/><Run Text="hit ball or place new balls)"/></TextBlock>
        
        <!-- Holes -->
        <Ellipse x:Name="Hole1" Fill="Black" Stroke="Black" Height="40" Width="40" Canvas.Left="10" Canvas.Top="10" Canvas.ZIndex="4"/>
        <Ellipse x:Name="Hole2" Fill="Black" Stroke="Black" Height="40" Width="40" Canvas.Left="550" Canvas.Top="10" Canvas.ZIndex="4"/>
        <Ellipse x:Name="Hole3" Fill="Black" Stroke="Black" Height="40" Width="40" Canvas.Left="550" Canvas.Top="270" Canvas.ZIndex="4"/>
        <Ellipse x:Name="Hole4" Fill="Black" Stroke="Black" Height="40" Width="40" Canvas.Left="10" Canvas.Top="270" Canvas.ZIndex="4"/>
        <Ellipse x:Name="Hole5" Fill="Black" Stroke="Black" Height="40" Width="40" Canvas.Left="280" Canvas.Top="10" Canvas.ZIndex="4"/>
        <Ellipse x:Name="Hole6" Fill="Black" Stroke="Black" Height="40" Width="40" Canvas.Left="280" Canvas.Top="270" Canvas.ZIndex="4"/>
        
        <!-- Initial balls -->
        <Ellipse x:Name="Ball1" Stroke="Black" Height="25" Width="25" Canvas.Left="288" Canvas.Top="148" Canvas.ZIndex="5" StrokeThickness="0">
            <Ellipse.Fill>
                <RadialGradientBrush>
                    <GradientStop Color="White" Offset="0"/>
                    <GradientStop Color="LightGray" Offset="1"/>
                </RadialGradientBrush>
            </Ellipse.Fill>
        </Ellipse>
        <Ellipse x:Name="Ball2" Stroke="Black" Height="25" Width="25" Canvas.Left="510" Canvas.Top="73" Canvas.ZIndex="5" StrokeThickness="0">
        	<Ellipse.Fill>
        		<RadialGradientBrush>
        			<GradientStop Color="White" Offset="0"/>
        			<GradientStop Color="Blue" Offset="1"/>
        		</RadialGradientBrush>
        	</Ellipse.Fill>
        </Ellipse>
        
        <!-- Line to display while knocking a ball -->
        <Line x:Name="KnockLine" Stroke="White" StrokeThickness="2" StrokeDashArray="5 5" Canvas.ZIndex="6" Visibility="Collapsed"/>
    </Canvas>
</UserControl>
